/**
 * @author DCSGO
 * @version 1.0
 * 处理流(包装流)
 */
public class BufferedReader_ extends Reader_ {
    Reader_ reader_;

    //可以接收 Reader_ 的子类
    public BufferedReader_(Reader_ reader_) {
        this.reader_ = reader_;
    }

    @Override
    public void readFile() {
        reader_.readFile();
    }

    @Override
    public void readString() {
        reader_.readString();
    }

    //扩展 FileReader_ 批量读取文件
    public void readFiles(int num) {
        for (int i = 0; i < num; i++) {
            reader_.readFile();
        }
    }

    //扩展 StringReader_ 批量读取字符串
    public void readStrings(int num) {
        for (int i = 0; i < num; i++) {
            reader_.readString();
        }
    }
}
